<?xml version="1.0" encoding="utf-8"?>
<Content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:blueonionsoftware-com:bloget:runtime:data">
  <text>
		&lt;p&gt;Phil Haacked's blog has an excellent article on using &lt;a href="http://haacked.com/archive/2006/08/07/TinyTrickForViewStateBackedProperties.aspx"&gt;the null coalescing operator with value types&lt;/a&gt;. I ran into to this very issue just the other night and like Phil quickly gave up. To summarize the trick.&lt;/p&gt;
		&lt;pre&gt;bool result = (bool)ViewState["WillSucceed"] ?? false;&lt;/pre&gt;
		&lt;p&gt;won't compile but just change the casting order to (note the extra parenthesis):&lt;/p&gt;
		&lt;pre&gt;bool result = (bool)(ViewState["WillSucceed"] ?? false);&lt;/pre&gt;
		&lt;p&gt;and your in. Excellent tip!&lt;/p&gt;
</text>
  <last_update>2007-07-25T02:56:24.859375Z</last_update>
  <source_title />
  <source_link />
  <comments />
  <references />
  <attachments />
</Content>